package com.ff.neuropp.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "t_file_dto", uniqueConstraints = {@UniqueConstraint(columnNames="id")})
/**
 * 作业信息表
 * @author sun_weiwu
 *
 */
public class FileDto {
	 private static final long serialVersionUID = 1L;


	    @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    private int id;
	    
	    @Column(name = "name", columnDefinition = "varchar(100) COMMENT '名称'")
	    @ApiModelProperty(value = "名称")
	    private String name;

		@Column(name = "content", columnDefinition = "varchar(200) COMMENT '描述'")
		@ApiModelProperty(value = "描述")
		private String content;

        @Column(name = "file_type")
        @ApiModelProperty(value = "类型")
        private String fileType;

	    
	    @Column(name = "url", columnDefinition = "varchar(200) COMMENT '链接地址'")
	    @ApiModelProperty(value = "链接地址")
	    private String url;

	    //操作时间
		@Column(name = "create_time",updatable = false)
	    @org.hibernate.annotations.CreationTimestamp
	    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	    private Date createDate;
	    
	    @Column(name = "update_time", columnDefinition = "datetime COMMENT '更新时间'")
	    private Date updateTime;
	    
}
